
load("debug.jl")

module TestInstrument
using Base, Debug
import Debug.trap

trap(line, file) = println("trap: line = $line, file = $(repr(file))")

code = quote
    function()
        i = 1
        while i < 4
            println(i)
            i = i+1
        end
#         for i=1:3
#             println(i)
#         end
    end
end

icode = instrument(code)
println(icode)

eval(icode)()


acode = analyze(code)

end
